@import "../base/spacing";

.message {
  &:extend(.flex);
  justify-content: flex-start;
  align-items: center;
  min-width: 500px;
  margin: 0 auto 15px auto;
  padding: 10px 15px;
  background: @background-message;
  border: 1px solid #ddd;
  font-size: 13.5px;

  strong {
    font-weight: 600;
  }

  > i {
    font-size: 16px;
    margin-right: 10px;
  }

  .btn {
    background: transparent;
    border-color: @color-text--muted;
    margin-left: auto; // message buttons are always pulled to the right

    &:hover {
      background: fadeout(@color-text--muted, 85%);
    }
  }

  ul {
    list-style: disc;
    margin-left: 20px;
  }

  &.success,
  &.primary,
  &.info,
  &.error {
    border-color: transparent;
  }

  &.success {
    background: @background-message--success;
    color: @color-message--success;

    i {
     color: @color-message--success;
    }

    .btn {
      border-color: @color-message--success;
      color: @color-message--success;

      &:focus,
      &:active {
        border-color: @color-message--success;
      }

      &:hover {
        background: fadeout(@color-message--success, 85%);
      }
    }
  }

  &.primary {
    background: @background-message--primary;
    color: @color-message--primary;

    i {
     color: @color-message--primary;
    }

    .btn {
      border-color: @color-message--primary;
      color: @color-message--primary;

      &:focus,
      &:active {
        border-color: @color-message--primary;
      }

      &:hover {
        background: fadeout(@color-message--primary, 85%);
      }
    }
  }

  &.info {
    background: @background-message--info;
    color: @color-message--info;

    i {
     color: @color-message--info;
    }

    .btn {
      border-color: @color-message--info;
      color: @color-message--info;

      &:focus,
      &:active {
        border-color: @color-message--info;
      }

      &:hover {
        background: fadeout(@color-message--info, 85%);
      }
    }
  }

  &.error {
    background: @background-message--error;
    color: @color-message--error;

    i {
     color: @color-message--error;
    }

    .btn {
      border-color: @color-message--error;
      color: @color-message--error;

      &:focus,
      &:active {
        border-color: @color-message--error;
      }

      &:hover {
        background: fadeout(@color-message--error, 85%);
      }
    }
  }

  a:not(.btn) {
    text-decoration: underline;
  }
}
